import { Field, Int, ObjectType, Directive } from '@nestjs/graphql';

@ObjectType()
export class User {
    @Field(type => Int)
    userId: number;

    @Directive('@upper')
    @Field()
    username: string;

    @Field(type => [String])
    roles: string[];

    @Directive('@auth(requires: admin)')
    @Field({ nullable: true })
    password: string;
}